//
//  ItemPickerViewCellModel.m
//  MKUI
//
//  Created by sushangjin on 2020/6/5.
//Copyright © 2020 sushangjin. All rights reserved.
//

#import "ItemPickerViewCellModel.h"
#import "ItemPickerViewCell.h"

@implementation ItemPickerViewCellModel
- (id)initWithModelObject:(Item *)modelObject{
	if (self=[super init]) {
		self.modelObject = modelObject;
        self.title = self.modelObject.name;
		self.cellClass = [ItemPickerViewCell class];
	}
	return self;
}
@end


@interface ItemPickerViewCellBase ()

@end

@implementation ItemPickerViewCellBase
- (id)initWithFrame:(CGRect)frame{
	if (self=[super initWithFrame:frame]) {
	}
	return self;
}
- (void)layoutSubviews{
	[super layoutSubviews];
	//	CGRect bounds = self.contentView.bounds;
}
- (void)setCustomCellModel:(ItemPickerViewCellModel *)customCellModel{
	_customCellModel = customCellModel;
    Item *modelObject = customCellModel.modelObject;
    self.titleLabel.text = modelObject.name;
}
#pragma mark - protocol:MKUIPickerViewCellProtocol
MKDEF_MKUIPickerViewCellModel(ItemPickerViewCellModel, customCellModel)
@end
